home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ML_VECTB.ZIP / UTILS / MKFORM4.PAS < prev    next >
Pascal/Delphi Source File  |  1996-03-06  |  895b  |  43 lines

  1. uses dosio;
  2. var
  3.   coord:array[0..60] of record x,y,z:integer end;
  4.   max:word;
  5.   f:file;
  6.  
  7. Procedure BuildForm;
  8. var a:word;
  9. begin
  10.   max:=0;
  11.   for a:=0 to 42 do begin
  12.     with coord[max] do begin
  13.       x:=trunc(100*cos(2*pi*a/43));
  14.       y:=0;
  15.       z:=trunc(100*sin(2*pi*a/43));
  16.     end;
  17.     inc(max);
  18.   end;
  19.   with coord[max] do begin
  20.     x:=0; y:=20; z:=0; inc(max);
  21.   end;
  22.   with coord[max] do begin
  23.     x:=0; y:=-20; z:=0; inc(max);
  24.   end;
  25.   with coord[max] do begin
  26.     x:=0; y:=0; z:=-12; inc(max);
  27.   end;
  28.   with coord[max] do begin
  29.     x:=-12; y:=0; z:=-12; inc(max);
  30.   end;
  31.   with coord[max] do begin
  32.     x:=12; y:=0; z:=12; inc(max);
  33.   end;
  34. end;
  35.  
  36. begin
  37.   Writeln('Making figure ...');
  38.   openforoutput(f,'_jupiter.bal','');
  39.   BuildForm;
  40.   blockwrite(f,max,2);  { Nr of points in the 3D form }
  41.   blockwrite(f,coord,max*3*2);
  42.   closefile(f,'');
  43. end.